package cn.csc.module.order.controller.admin.order.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.List;

/**
* 订单信息 Base VO，提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
*/
@Data
public class OrderBaseVO {

    @ApiModelProperty(value = "订单ID", required = true)
    @NotNull(message = "订单ID")
    private BigInteger id;

    @ApiModelProperty(value = "客户编号", required = true)
    @NotNull(message = "客户编号不能为空")
    private BigInteger userId;

    @ApiModelProperty(value = "用户手机号", required = true)
    private String nickName;

    @ApiModelProperty(value = "用户手机号", required = true)
    private String memberPhone;
    @ApiModelProperty(value = "店铺编码")
    private BigInteger shopId;

    @ApiModelProperty(value = "店铺名称")
    private String shopName;

    @ApiModelProperty(value = "订单状态 0未付款,1已付款,2已发货,3已签收,-1退货申请,-2退货中,-3已退货,-4取消交易 -5撤销申请", required = true)
    @NotNull(message = "订单状态 0未付款,1已付款,2已发货,3已签收,-1退货申请,-2退货中,-3已退货,-4取消交易 -5撤销申请不能为空")
    private Integer orderStatus;

    @ApiModelProperty(value = "用户售后状态 0 未发起售后 1 申请售后 -1 售后已取消 2 处理中 200 处理完毕", required = true)
    @NotNull(message = "用户售后状态 0 未发起售后 1 申请售后 -1 售后已取消 2 处理中 200 处理完毕不能为空")
    private Integer afterStatus;

    @ApiModelProperty(value = "单个orderItem的配送类型1.快递物流(默认）,2.送货上门,3.自提")
    private Integer deliveryType;


    @ApiModelProperty(value = "总值", required = true)
    @NotNull(message = "总值不能为空")
    private BigDecimal total;

    @ApiModelProperty(value = "订单商品总数")
    private Integer allCount;

    @ApiModelProperty(value = "付款时间")
    private LocalDateTime payTime;

    @ApiModelProperty(value = "发货时间")
    private LocalDateTime deliveryTime;

    @ApiModelProperty(value = "完成时间")
    private LocalDateTime finallyTime;

    @ApiModelProperty(value = "结算时间")
    private LocalDateTime settledTime;

    @ApiModelProperty(value = "取消时间")
    private LocalDateTime cancelTime;

    @ApiModelProperty(value = "是否已支付，1.已支付0.未支付")
    private Integer isPayed;

    @ApiModelProperty(value = "订单关闭原因 1-超时未支付 4-买家取消 15-已通过货到付款交易")
    private Integer closeType;

    @ApiModelProperty(value = "用户订单删除状态，0：没有删除， 1：回收站， 2：永久删除")
    private Integer deleteStatus;

    @ApiModelProperty(value = "订单版本号，每处理一次订单，版本号+1")
    private Integer version;

    @ApiModelProperty(value = "用户订单地址id")
    private BigInteger orderAddrId;

    @ApiModelProperty(value = "支付渠道 0余额 1微信 2支付宝 3通联 4拉卡拉 5建行龙支付", required = true)
    @NotNull(message = "支付渠道 0余额 1微信 2支付宝 3通联 4拉卡拉 5建行龙支付不能为空")
    private String payChannel;

    @ApiModelProperty(value = "订单支付单号")
    private String outTradeNo;

    @ApiModelProperty(value = "第三方支付流水号")
    private String escrowTradeNo;

    @ApiModelProperty(value = "是否是套餐", required = true)
    @NotNull(message = "是否是套餐不能为空")
    private String isPackage;

    @ApiModelProperty(value = "是否是积分产品")
    private String isIntegral;

    @ApiModelProperty(value = "产品名称，冗余字段")
    private String spuName;

    @ApiModelProperty(value = "提交支付订单id")
    private String merchantOrderId;

    @ApiModelProperty(value = "发货附件")
    private String  deliveryFile;

    @ApiModelProperty(value = "订单类型 0普通订单，1采购商订单")
    private Integer orderType;

    @ApiModelProperty(value = "支付类型，0微信支付、1购物卡支付、2结合支付")
    private Integer payType;

    @ApiModelProperty(value = "实付金额")
    private BigDecimal spuActualAmount;

    @ApiModelProperty(value = "购物卡支付金额")
    private BigDecimal cardPayAmount;

    @ApiModelProperty(value = "使用的购物卡id")
    private String cardId;
}
